<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //函数
        //function
        function fn(){//函数名
            alert('hello')//函数体
        }
        fn()//调用



        function hi(){
        //for(let a =1;a<=3;a++)
            for (let f = 1;f<=9;f++){
                for(let g =1;g<=f;g++){
                document.write(`${f}*${g}=${f*g}`)
            }
            document.write('<br>')
        }
        }
        hi()

        
        function he(){
            let a = 0
            for(let c = 1;c<=100;c++){
                a += c
            }
            alert(a)
        }
        he()

        function x(num1,num2){
            num1= +prompt('1')
            num2= +prompt('2')
            alert(num1+num2)
        }
        x()
        

    </script>
</body>
</html>